package com.lw.demo;

import java.time.Duration;
import java.time.Instant;
import java.util.stream.LongStream;
//简单for循环计算
public class ForLoopCalculator implements Calculator {

    //计算1至10000000的正整数之和。
	@Override
    public long sumUp(long[] numbers) {
        long total = 0;
        for (long i : numbers) {
            total += i;
        }
        return total;
    }

}